<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>绝对定位</title>
    <style>
        div{

            width: 100px;
            height: 100px;
            border: 1px solid red;


        }
        /*#d1{
            position: absolute;!*绝对定位*!
            right: 100px;!*坐标相对于窗口位置*!
            top: 0px;

        }*/
        #big{

            width: 200px;
            height: 200px;
            background-color: red;
            margin: 100px 0 0 100px;
            position: relative;/*做参照物*/

        }
        #big>div{
            width: 100px;
            height: 100px;
            background-color: green;
            margin: 50px 0 0 50px;
            position: relative;/*做参照物*/
        }
        #big>div>div{
            width: 50px;
            height: 50px;
            background-color: blue;
            position: absolute;
            top:0;
            left: 0;

        }


    </style>

</head>
<body>
<div id="big">
    <div>
        <div></div>
    </div>
</div>
<div id="d2">div2</div>
<div id="d3">div3</div>


</body>
</html>